package com.sddr.base.frame.memory;

import com.sddr.common.entity.ConfigRule;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author 山顶洞人郑某
 * @className ConfigMemory.java 内存配置
 * @date 2025 06 04
 */
public class ConfigMemory {

    private final Map<String, ConfigRule> map;


    public ConfigMemory() {
        this.map = new ConcurrentHashMap<>(2);
    }

    public boolean putConfig(String key, ConfigRule configRule) {
        map.put(key, configRule);
        return true;
    }
    public ConfigRule getConfig(String key) {
        return map.get(key);
    }

}
